//
//  WmcSelectAddressEmptyView.swift
//  YPWatermarkCamera
//
//  Created by 周诗松 on 2022/5/17.
//

import UIKit

class WmcSelectAddressEmptyView: WmcEmptyView {
    enum Status {
        /// 全部搜索
        case all
        /// 关键字搜索
        case keywords
    }

    var status: Status = .all {
        didSet {
            if status == .all {
                tipLabel.text = "没有想要的地址？点击上方搜索附近地点"
            } else if status == .keywords {
                tipLabel.text = "暂无数据"
            }
        }
    }

    override func makeUI() {
        imageView.image = "select_address_empty".wmc_image
        addSubview(imageView)
        tipLabel.text = "没有想要的地址？点击上方搜索附近地点"
        tipLabel.font = 14.wmc_font
        tipLabel.textColor = .wmc_grayH8_8A8A99
        addSubview(tipLabel)

        imageView.snp.makeConstraints { make in
            make.top.equalTo(0)
            make.centerX.equalToSuperview()
            make.width.height.equalTo(100)
        }

        tipLabel.snp.makeConstraints { make in
            make.left.right.bottom.equalToSuperview()
            make.top.equalTo(imageView.snp.bottom).offset(10)
        }
    }
}
